#ifndef STATE_FACTORY_H_
#define STATE_FACTORY_H_

#include "factory.h"
#include "gameinterface.h"
#include "state.h"
#include "log.h"



class CStateFactory : public CFactory
{
  
  CState * m_pCurState;
  
  CFactoryLine * m_pStateLine;

  bool m_bRunning;

  void ParseStateMessage( int );
  
  double m_DPS;
  
  CGameInterface * m_pGameInterface;
  
public:
	
  CStateFactory() : CFactory()
  {
	
	  Init();
	  
  }
  
  inline CFactoryLine * StateLine()
  {
	  
	  return m_pStateLine;
	  
  }
  
  virtual ~CStateFactory()
  {
	  
	 delete m_pStateLine;
	  
  }
	
  void SetGameInterface( CGameInterface * );
  
  void Run();
  
  void SetCurrentState( CState * );
  
  void Init();

  
};

#endif
